Skip to content

fix(copilot): honor preset command template overrides#3592

Open
faqehanoor wants to merge 1 commit into
github:mainfrom
faqehanoor:main
Open

fix(copilot): honor preset command template overrides#3592
faqehanoor wants to merge 1 commit into
github:mainfrom
faqehanoor:main

Conversation

@faqehanoor

Copy link
Copy Markdown

## Summary

Fixes #2761 by updating the Copilot integration to resolve command templates through the existing preset-aware PresetResolver.

Previously, Copilot always used the bundled shared command templates, causing preset-provided command template overrides (such as specify.md) to be ignored. With this change, Copilot now honors preset overrides while preserving the existing fallback behavior when no override is available.

What changed

  • Updated the Copilot setup path to resolve command templates using PresetResolver.resolve(..., template_type="command")
  • Preserved the existing fallback behavior when no preset override exists
  • Added regression tests for:
    • Default fallback behavior
    • Preset override behavior

Testing

ruff check src/specify_cli/integrations/copilot/init.py tests/integrations/test_integration_copilot.py

pytest -q tests/integrations/test_integration_copilot.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Copilot command generation to honor preset command overrides.

Changes:

  • Resolves Copilot command templates through PresetResolver.
  • Adds fallback and override regression tests.
Show a summary per file
File Description
src/specify_cli/integrations/copilot/__init__.py Adds preset-aware command resolution.
tests/integrations/test_integration_copilot.py Tests fallback and preset override behavior.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment on lines +374 to +376
resolved_template = preset_resolver.resolve(
src_file.stem, template_type="command"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copilot speckit.specify does not honor preset spec-template override

4 participants